// 路由规则 和 实例化路由对象
import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/components/Home.vue';
import Detail from '@/components/Detail.vue';
import List from '@/components/List.vue';
import Land from '@/components/Land.vue';
import Cinema from '@/components/Cinema.vue';


Vue.use(VueRouter);

export default new VueRouter({
	routes: [{
			// 首页
			path: '/home',
			component: Home
		},
		{
			//详情页
			path: '/film/:id',
			name: 'detail',
			component: Detail
		},
		{	//列表页
			path:'/list',
			component:List
		},
		{
			//登录窗口
			path:'/Land',
			component:Land
		},
		{  //电影院
			path:'/cinema',
			component:Cinema
		},
		{
			path: "*",
			redirect: '/home'
		}

	]
})